﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using uMES.LeanManufacturing.ParameterDTO;

public partial class uMESdaReportMasterPage : System.Web.UI.MasterPage
{
    public string strTitle = "";
    public string strNavigation = "";
    public HtmlGenericControl div;

    protected void Page_Init(object sender, EventArgs e)
    {
        div = this.divTit;
    }

    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            string url = Request.Url.ToString();
            EmployeeInfoDTO dto = Session["employeeinfo"] as EmployeeInfoDTO;
            if (dto == null)
            {
                Response.Write("<script type='text/javascript'>alert('当前页面已过期，请重新登录！');</script>");
                Response.Write("<script type='text/javascript'>window.open('../Login.aspx','_top');</script>");
                Response.Write("<script type='text/javascript'>window.open('../Login.aspx','_parent');</script>");
                Response.Write("<script type='text/javascript'>window.parent.opener=null;window.top.close();</script>");
                Response.Write("<script type='text/javascript'>window.open('../Login.aspx');</script>");
                return;
            }
            string employeeid = dto.Employeeid;
            DataTable pagesCanSee = dto.DtPages;

            AuthorityControl author = new AuthorityControl();
            if (!author.isHaveAuthorty(url, dto))
            {
                Response.Write("<script type='text/javascript'>alert('您无权访问该页面！');</script>");
                Response.Write("<script type='text/javascript'>window.open('../Login.aspx','_top');</script>");
                Response.Write("<script type='text/javascript'>window.open('../Login.aspx','_parent');</script>");
                Response.Write("<script type='text/javascript'>window.parent.opener=null;window.top.close();</script>");
                Response.Write("<script type='text/javascript'>window.open('../Login.aspx');</script>");
                return;
            }
        }
        catch (Exception)
        {
            
            throw;
        }
    }

    public void ChangeFrame(Boolean boolIsReport)
    {
    }
}
